<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.yyq.adms.usermanage.pojo.*" %>
<%@ include file="../public/public.jsp" %>
<%
	Map map = (Map)valueStack.findValue("formMap");
	List mps = (List)map.get("mps");
	List rpms = (List)map.get("rpms");
%>

		<form id="rpmForm" action="rpm.action" method="post">
			<input type="hidden" name="cmd" value="add">
			<input type="hidden" id="roleId" name="po.roleId" value="<s:property value='po.roleId'/>">
			<input type="hidden" id="moduleId" name="po.moduleId" value="<s:property value='po.moduleId'/>">

			<table width="100%" border="0" align="center" cellspacing="1"
				bgcolor="#000000">
				<tr>
					<td bgcolor="#80BFFF" width="30%">
					</td>
					<!-- <td bgcolor="#80BFFF" width="70%">&nbsp;
					</td>
					 -->
					 <td  width="30%" align="right" height="25"   bgcolor="#A0C6E5" ><font color="snow" size="2"><input id="chk" type="checkbox" onclick="selAllCheckbox(this)"><label for="chk">全选</label>&nbsp;</font></td>
				</tr>
				<tr>
					<td align="right" valign="middle" bgcolor="#DBEAF5"  height="25"> 
						<font color="#10659E" size="2">&nbsp;&nbsp;模块名称:&nbsp;&nbsp;</font>
					</td>
					<td align="left" valign="middle" bgcolor="#FFF7E5" height="25">
						<%-- 
							获批工法
						--%>
						<font color="#FF6600" size=2>
						<s:property value="formMap.moduleCname"/>
						</font>
					</td>
				</tr>
			<% for(int i=0; mps!=null&&i<mps.size(); ++i){
				SysModulePerms mp = (SysModulePerms)mps.get(i);
			%>
				<tr>
					<td align="right" valign="middle" bgcolor="#DBEAF5" height="25"> 
						<font color="#10659E" size="2">&nbsp;&nbsp;<%=mp.getPermCname() %>:&nbsp;&nbsp;</font>
					</td>
					<td align="left" valign="middle" bgcolor="#FFF7E5"  height="25">
						<input type="checkbox" name="formMap.mps" value="<%=mp.getPermId() %>" 
						<% for(int j=0;rpms!=null&&j<rpms.size(); ++j){
							SysRPM rpm = (SysRPM)rpms.get(j);
							if(mp.getPermId().intValue()==rpm.getPermId().intValue()){
								%>
								checked
								<%
								break;
							} 
						}
						%>
						>
						<font color="#FF6600" size=2>*</font>
					</td>
				</tr>
			<% } %>
				<tr>
					<td align="center" bgcolor="#DBEAF5" width="100%" height="25"
						colspan="2">
						<input type="button" value="确定" onclick="updateRPM()">
						&nbsp;&nbsp;
						&nbsp;&nbsp;
						<input type="reset" value="重置">
					</td>
				</tr>
			</table>
		</form>
	